package com.oneonefive.trainticketsystem.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.oneonefive.trainticketsystem.pojo.Train;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;


@Mapper
public interface TrainMapper extends BaseMapper<Train> {
    Train selectByTrainId(Integer trainId);
    int getRowCount(
            @Param("trainId") Integer trainId,
            @Param("startLocation") String startLocation,
            @Param("endLocation") String endLocation);
    List<Train> selectAllTrain(
            @Param("trainId") Integer trainId,
            @Param("startLocation") String startLocation,
            @Param("endLocation") String endLocation,
            @Param("startRow") int startRow);
}




